<template>
	<!-- <view class="m-icon" :class="['m-icon-'+type]" @click="onClick()"></view> -->
	<!-- <svg class="icon" aria-hidden="true" :style="{ fontSize: size, fill: color }">
		<use :xlink:href="'#' + icon"></use>
	</svg> -->
	<div>
		<!-- <svg class="icon" aria-hidden="true" :style="{ fontSize: size, fill: color }">
			<use :xlink:href="'#icon-' + icon"></use>
		</svg> -->
		<i :class="'iconfont icon-'+icon" :style="{ fontSize: size +'rpx', color: color }"></i>
		<!-- <i class="iconfont icon-yinhuan1"></i> -->
	</div>
</template>

<script>
	// import  "@/static/iconfont/iconfont.js"
	export default {
		props: {
			/**
			 * 图标类型
			 */
			icon:{
				type:String,
				default:"yinhuan1"
			},
			color:{
				type:String,
				default:"#333"
			},
			size:{
				type:Number,
				default:40
			},
			type: {
				type: String,
				default: "base",
			},
		},
		methods: {
			onClick() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import "./m-icon.scss";
	// @import "./iconfont/iconfont.css";
</style>
